package com.zmj.framework.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zmj.framework.bean.Product;
import com.zmj.framework.dao.ProductDao;
import com.zmj.framework.service.ProductManager;
import com.zmj.framework.util.PageController;

@Service("productManager")
public class ProductManagerImpl implements ProductManager {
	@Autowired
	private ProductDao productDao;

	public Product getProductById(String id) {
		return productDao.getProductById(id);
	}

	public List<Product> getAllProductList() {
		return productDao.getAllProductList();
	}

	public List<Product> getProductList(Product product,
			PageController controller) {
		return productDao.getProductList(product, controller);
	}

	public int saveProduct(Product product) {
		return productDao.saveProduct(product);
	}

	public int removeProduct(String id) {
		return productDao.removeProduct(id);
	}

	public List<Product> getProductListBySplb(String splb) {
		return productDao.getProductListBySplb(splb);
	}

	public Product getProductBySpbh(String spbh) {
		return productDao.getProductBySpbh(spbh);
	}

}
